|
|
In article <4219fc6a@news.povray.org>,
"William Peska" <wil### [at] yahoocom> wrote:
It'd help if you gave a little more detail...for instance, maybe
describing what you think such a feature would do. As it is, you're
essentially asking for "magic".
There's nothing particularly special about UV coordinates, you pick a
system that fits your purpose. For instance, for UV-mapping a sphere,
you usually pick spherical coordinates...that would not work well for a
torus. It could work for a box, but you'd probably pick a mapping
designed specifically for boxes instead. The shape of an isosurface is
very arbitrary, it could be a sphere, a torus, or something far more
complex. There is simply no way for POV to guess what you might want.
One possibility that does come to mind would be to allow the user to
specify a pair of functions mapping XYZ coordinates to UV coordinates.
It would not be particularly easy to use, though. It is in fact already
possible, though you have to jump through a few hoops...you need to use
a function pattern that implements the desired mapping. For example
(untested!):
#declare basePattern = function {pattern {checker scale 0.1}};
#declare uFn = function (x, y, z) {
atan(x, z)/(2*pi) + 0.5
};
#declare vFn = function (x, y, z) {
atan(y, sqrt(x*x + z*z))/(2*pi) + 0.5
};
isosurface {
...
pigment {function {basePattern(uFn(x, y, z), vFn(x, y, z), 0)}
...
}
}
--
Christopher James Huff <cja### [at] gmailcom>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/
Post a reply to this message
|
|